﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EBA.Data;
using System.Linq.Expressions;

namespace EBA.Logging
{
    /// <summary>
    /// Defines LogProvider for reading and updating log messages.
    /// </summary>
    public interface ILogProvider
    {
        /// <summary>
        /// Get a logger instance
        /// </summary>
        /// <returns></returns>
        ILogger GetLogger(string name=null);

        /// <summary>
        /// The log query
        /// </summary>
        IQuery<ILog> Logs { get; }

        /// <summary>
        /// Deletes the log with the specified id.
        /// </summary>
        /// <param name="id">identifier of a log</param>
        void Delete(string id);

        /// <summary>
        /// Deletes the logs with the specified filter expression.
        /// </summary>
        /// <param name="filterExpression">filter log expression</param>
        void DeleteAll(Expression<Func<ILog, bool>> filterExpression);
    }
}
